home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "modWebPack"
- '*******************
- '* By Jared Conway *
- '* October 19, 99 *
- '* Written for fun *
- '* and my own use. *
- '*******************
-
- 'WARNING! This code is distributed FOR FREE on the internet and
- 'is not to be sold or used for any other form of monetary gain!
- 'It is made for educational purposes ONLY! You can get the most
- 'recent version of this program and source code and many other
- 'programs I have made at members.home.net/jared2k
-
- 'THINGS STILL TO BE ADDED
- 'Offline browsing, scheduling automatic browsing with TaskScheduler,
- 'skinning and user controlled color changing, AutoFill for addresses,
- 'site filtering (for adult content), tips, online help, ability
- 'to add favorites while at the site with one click
-
- 'structure used to handle favorites
- Type cFavorite
- URL As String * 50
- Title As String * 12
- End Type
-
- 'structure used to handle options
- Type cOptions
- StartURL As String * 50 'starting url when browser launched
- Home1URL As String * 50 'left click home site
- Home2URL As String * 50 'right click home site
- SearchURL As String * 50 'search url
- ShowPaths As Integer 'display path in address bar? 1 yes, 0 no
- End Type
-
- Global bHasOptionsChanged As Boolean 'used if options have changed
- Global bHasChanged As Boolean 'used if favorites have changed
- Global Options As cOptions 'global instance of options
- Global Fav As cFavorite 'global instance of favorites
- Public Sub gRefreshOptions()
- 'open the options file and load them into memory
- Open App.Path & "\options.web" For Random As #1 Len = Len(Options)
- Get #1, 1, Options
- Close #1
-
- 'display the options we loaded on the screen
- If RTrim(Options.StartURL) = "-" Then RTrim(Options.StartURL) = ""
- frmOptions.txtStartingURL.Text = RTrim(Options.StartURL)
- frmOptions.txtHome1URL.Text = RTrim(Options.Home1URL)
- frmOptions.txtHome2URL.Text = RTrim(Options.Home2URL)
- frmOptions.txtSearchURL.Text = RTrim(Options.SearchURL)
- If Options.ShowPaths = 1 Then
- frmOptions.chkShowPaths.Value = 1
- Else
- frmOptions.chkShowPaths.Value = 0
- End If
- 'set options to not have changed (filling in the above would
- 'trick the timer into enabling the save button even though
- 'it should not be enabled
- bHasOptionsChanged = False
- End Sub
- Public Sub gLoadFavorites()
- 'open the favorites file and display them to the screen
- Open App.Path & "\favorites.web" For Random As #1 Len = Len(Fav)
- For X = 1 To 10
- Get #1, X, Fav
- frmMain.lblLink1(X - 1).Caption = RTrim(Fav.Title)
- Next X
- Close #1
- End Sub
-
- Public Sub gRefreshFavorites()
- 'open favorites file and load them on the screen
- Open App.Path & "\favorites.web" For Random As #1 Len = Len(Fav)
- For X = 1 To 10
- Get #1, X, Fav
- frmFav.txtLink(X - 1).Text = RTrim(Fav.URL)
- frmFav.txtTitle(X - 1).Text = RTrim(Fav.Title)
- Next X
- Close #1
-
- 'set changed to false
- bHasChanged = False
- 'disable the save button until something changes
- frmFav.cmdSave.Enabled = False
- End Sub
-
- Public Sub errHandler()
- 'global error handler that prevents the browser from crashes
- Exit Sub
- End Sub
-